/*
 * @Author: 千锋爱佛僧
 * @公众号: 大前端私房菜
 * @Slogan: 千锋精品教程，好学得不像实力派！
 */
/*
 * @Author: 千锋爱佛僧
 * @公众号: 大前端私房菜
 * @Slogan: 千锋精品教程，好学得不像实力派！
 */

import { IMenuType } from "@/types/router";
import CateEdit from "@/views/category/edit";
import CateList from "@/views/category/list";
import CatePub from "@/views/category/pub";
import CompanyList from "@/views/company/list";
import CompanyPub from "@/views/company/pub";
import DashBoard from "@/views/dashboard/dashboard";
import JobList from "@/views/job/list";
import JobPub from "@/views/job/pub";
import RoleManager from "@/views/manager/role";
import UserManager from "@/views/manager/user";
import Setting from "@/views/setting";
import LargeFile from "@/views/large-file/index";
import JoinList from "@/views/join/list";

//将路由关系整合为一个自定义的json数据包
export const adminRoutes: IMenuType[] = [
  {
    key: "/",
    path: "/",
    label: "数据统计",
    element: <DashBoard />,
  },
  {
    key: "/category",
    path: "/category",
    label: "分类管理",
    children: [
      {
        key: "/category/list",
        path: "/category/list",
        label: "分类列表",
        element: <CateList />,
      },
      {
        key: "/category/pub",
        path: "/category/pub",
        label: "发布分类",
        element: <CatePub />,
      },
      {
        key: "/category/edit",
        path: "/category/edit",
        label: "编辑分类",
        element: <CateEdit />,
        hidden: true,
      },
    ],
  },
  {
    key: "/company",
    path: "/company",
    label: "企业管理",
    children: [
      {
        key: "/company/list",
        path: "/company/list",
        label: "企业列表",
        element: <CompanyList />,
      },
      {
        key: "/company/pub",
        path: "/company/pub",
        label: "新增企业",
        element: <CompanyPub />,
      },
    ],
  },
  {
    key: "/job",
    path: "/job",
    label: "岗位管理",
    children: [
      {
        key: "/job/list",
        path: "/job/list",
        label: "岗位列表",
        element: <JobList />,
      },
      {
        key: "/job/pub",
        path: "/job/pub",
        label: "岗位录入",
        element: <JobPub />,
      },
    ],
  },
  {
    key: "/manager",
    path: "/manager",
    label: "角色权限",
    children: [
      {
        key: "/manager/role",
        path: "/manager/role",
        label: "角色管理",
        element: <RoleManager />,
      },
      {
        key: "/manager/user",
        path: "/manager/user",
        label: "账号管理",
        element: <UserManager />,
      },
    ],
  },
  {
    key: "/join",
    path: "/join",
    label: "报名列表",
    element: <JoinList />,
  },
  {
    key: "/setting",
    path: "/setting",
    label: "个人设置",
    element: <Setting />,
  },
  {
    key: "/large",
    path: "/large",
    label: "大文件上传",
    element: <LargeFile />,
  },
];
